package cn.ilovese.collect;
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.context.annotation.Bean;
import org.springframework.http.converter.HttpMessageConverter;

@SpringBootApplication
public class CollectApplication {

    public static void main(String[] args) {
        SpringApplication.run(CollectApplication.class, args);
    }

    @Bean
    public HttpMessageConverters fastJsonHttpMessageConverters() {
        final FastJsonHttpMessageConverter fasHttpMessageConverter = new FastJsonHttpMessageConverter();
        fasHttpMessageConverter.setDateFormat("yyyy-MM-dd  HH:mm:ss");
        return new HttpMessageConverters(new HttpMessageConverter[] { (HttpMessageConverter)fasHttpMessageConverter });
    }
}
